package com.lxd.design.pattern.factory1;

public class Factory {

	public static Sample creator(int which){
		if(which == 1)
			return new SampleA();
		else if(which == 2){
			return new SampleB();
		}
		return null;
	}
}
